<?php
class IndexController extends Nadeb_Controller_Front
{
	
    public function init()
    {
    	parent::init();
    }

    public function indexAction()
    {
    	$products = new Site_Model_Products();
    	
    	$this->view->news = $products->getNews(5);
    	$this->view->products = $products->getProducts(5);
    	$this->view->promotions = $products->getPromotions(5);
    	$this->view->sidebar = 'carrossel';
    }
    
    public function saveNewsLetterAction()
    {
    	$reg = new Application_Model_Db_Register();
    	$row = $reg->fetchNew();
    	$row->email = $this->_getParam('email');
    	if( $row->email ) $row->save();
    }
    
}

